<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: ZooomrRestAPI</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">ZooomrRestAPI</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/svn/ruby-zooomr-api/Zooomr_rb.html">
                svn/ruby-zooomr-api/Zooomr.rb
                </a>
        <br />
                <a href="../files/Zooomr_rb.html">
                Zooomr.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Main Zooomr API Class - give access to subclasses that make it look like
you&#8216;re calling the documented methods
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000091">authenticate_application</a>&nbsp;&nbsp;
      <a href="#M000100">authenticate_application</a>&nbsp;&nbsp;
      <a href="#M000098">call_method</a>&nbsp;&nbsp;
      <a href="#M000089">call_method</a>&nbsp;&nbsp;
      <a href="#M000099">call_post_method</a>&nbsp;&nbsp;
      <a href="#M000090">call_post_method</a>&nbsp;&nbsp;
      <a href="#M000092">complete_authentication</a>&nbsp;&nbsp;
      <a href="#M000101">complete_authentication</a>&nbsp;&nbsp;
      <a href="#M000102">create_login_link</a>&nbsp;&nbsp;
      <a href="#M000093">create_login_link</a>&nbsp;&nbsp;
      <a href="#M000097">create_signature</a>&nbsp;&nbsp;
      <a href="#M000088">create_signature</a>&nbsp;&nbsp;
      <a href="#M000087">new</a>&nbsp;&nbsp;
      <a href="#M000096">new</a>&nbsp;&nbsp;
      <a href="#M000095">params_are_valid</a>&nbsp;&nbsp;
      <a href="#M000094">params_are_valid</a>&nbsp;&nbsp;
      <a href="#M000103">params_are_valid</a>&nbsp;&nbsp;
      <a href="#M000104">params_are_valid</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">activity</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">activity</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">api_key</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">api_key</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">auth</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">auth</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">contacts</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">contacts</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">favorites</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">favorites</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">groups</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">groups</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">people</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">people</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">photos</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">photos</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">photosets</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">photosets</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">tags</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">tags</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">test</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">test</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">upload</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">upload</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">zipline</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">zipline</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000087" class="method-detail">
        <a name="M000087"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000087.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000087.html');return false;">
          <span class="method-name">new</span><span class="method-args">(a_api_key, a_shared_secret)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Constructor
</p>
<p>
IN:
</p>
<ul>
<li>a_api_key =&gt; your API key

</li>
<li>a_shared_secret =&gt; your shared secret

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li><a href="ZooomrRestAPI.html#M000087">new</a> <a
href="ZooomrRestAPI.html">ZooomrRestAPI</a> Object

</li>
</ul>
        </div>
      </div>

      <div id="method-M000096" class="method-detail">
        <a name="M000096"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000096.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000096.html');return false;">
          <span class="method-name">new</span><span class="method-args">(a_api_key, a_shared_secret)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Constructor
</p>
<p>
IN:
</p>
<ul>
<li>a_api_key =&gt; your API key

</li>
<li>a_shared_secret =&gt; your shared secret

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li><a href="ZooomrRestAPI.html#M000087">new</a> <a
href="ZooomrRestAPI.html">ZooomrRestAPI</a> Object

</li>
</ul>
        </div>
      </div>

      <div id="method-M000095" class="method-detail">
        <a name="M000095"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000095.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000095.html');return false;">
          <span class="method-name">params_are_valid</span><span class="method-args">(a_array_of_required_params, a_array_of_extra_allowed_param_names, a_hash_of_params_and_values)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Internal method for checking if the passed hash of params is acceptable to
a given methods parameter list
</p>
        </div>
      </div>

      <div id="method-M000104" class="method-detail">
        <a name="M000104"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000104.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000104.html');return false;">
          <span class="method-name">params_are_valid</span><span class="method-args">(a_array_of_required_params, a_array_of_extra_allowed_param_names, a_hash_of_params_and_values)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Internal method for checking if the passed hash of params is acceptable to
a given methods parameter list
</p>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000091" class="method-detail">
        <a name="M000091"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000091.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000091.html');return false;">
          <span class="method-name">authenticate_application</span><span class="method-args">(a_parameter_hash)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Start the authentication process, return a link that the user needs to
follow to tick the relavent box
</p>
<p>
Required Parameters:
</p>
<ul>
<li>a_perms - &quot;read&quot; or &quot;write&quot;

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li><a href="ZooomrResponse.html">ZooomrResponse</a> object on failure to get
frob, or a hash of:

</li>
<li>frob =&gt; frob to use with getToken/complete_authentication after the link
is followed

</li>
<li>link =&gt; http link for the user to follow to allow the access)

</li>
</ul>
        </div>
      </div>

      <div id="method-M000100" class="method-detail">
        <a name="M000100"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000100.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000100.html');return false;">
          <span class="method-name">authenticate_application</span><span class="method-args">(a_parameter_hash)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Start the authentication process, return a link that the user needs to
follow to tick the relavent box
</p>
<p>
Required Parameters:
</p>
<ul>
<li>a_perms - &quot;read&quot; or &quot;write&quot;

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li><a href="ZooomrResponse.html">ZooomrResponse</a> object on failure to get
frob, or a hash of:

</li>
<li>frob =&gt; frob to use with getToken/complete_authentication after the link
is followed

</li>
<li>link =&gt; http link for the user to follow to allow the access)

</li>
</ul>
        </div>
      </div>

      <div id="method-M000098" class="method-detail">
        <a name="M000098"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000098.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000098.html');return false;">
          <span class="method-name">call_method</span><span class="method-args">(a_method_to_call, a_params)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Make a call to the REST api
</p>
<p>
IN:
</p>
<ul>
<li>a_method_to_call =&gt; method to call

</li>
<li>a_params =&gt; a hash of parameters that are required to be passed to the
method you want to call - must NOT include the method its self

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li>false on failure, <a href="ZooomrResponse.html">ZooomrResponse</a> object
on success

</li>
</ul>
        </div>
      </div>

      <div id="method-M000089" class="method-detail">
        <a name="M000089"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000089.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000089.html');return false;">
          <span class="method-name">call_method</span><span class="method-args">(a_method_to_call, a_params)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Make a call to the REST api
</p>
<p>
IN:
</p>
<ul>
<li>a_method_to_call =&gt; method to call

</li>
<li>a_params =&gt; a hash of parameters that are required to be passed to the
method you want to call - must NOT include the method its self

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li>false on failure, <a href="ZooomrResponse.html">ZooomrResponse</a> object
on success

</li>
</ul>
        </div>
      </div>

      <div id="method-M000099" class="method-detail">
        <a name="M000099"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000099.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000099.html');return false;">
          <span class="method-name">call_post_method</span><span class="method-args">(a_method_to_call, a_params)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Make a call to the REST api
</p>
<p>
IN:
</p>
<ul>
<li>a_method_to_call =&gt; method to call

</li>
<li>a_params =&gt; a hash of parameters that are required to be passed to the
method you want to call - must NOT include the method its self

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li>false on failure, <a href="ZooomrResponse.html">ZooomrResponse</a> document
of the response on success

</li>
</ul>
        </div>
      </div>

      <div id="method-M000090" class="method-detail">
        <a name="M000090"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000090.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000090.html');return false;">
          <span class="method-name">call_post_method</span><span class="method-args">(a_method_to_call, a_params)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Make a call to the REST api
</p>
<p>
IN:
</p>
<ul>
<li>a_method_to_call =&gt; method to call

</li>
<li>a_params =&gt; a hash of parameters that are required to be passed to the
method you want to call - must NOT include the method its self

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li>false on failure, <a href="ZooomrResponse.html">ZooomrResponse</a> document
of the response on success

</li>
</ul>
        </div>
      </div>

      <div id="method-M000092" class="method-detail">
        <a name="M000092"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000092.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000092.html');return false;">
          <span class="method-name">complete_authentication</span><span class="method-args">(a_parameter_hash)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Finishes the authentication process by calling get_token
</p>
<p>
Required Parameters:
</p>
<ul>
<li>frob - frob from get_frob/authentication application

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li><a href="ZooomrResponse.html">ZooomrResponse</a> object

</li>
</ul>
        </div>
      </div>

      <div id="method-M000101" class="method-detail">
        <a name="M000101"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000101.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000101.html');return false;">
          <span class="method-name">complete_authentication</span><span class="method-args">(a_parameter_hash)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Finishes the authentication process by calling get_token
</p>
<p>
Required Parameters:
</p>
<ul>
<li>frob - frob from get_frob/authentication application

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li><a href="ZooomrResponse.html">ZooomrResponse</a> object

</li>
</ul>
        </div>
      </div>

      <div id="method-M000102" class="method-detail">
        <a name="M000102"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000102.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000102.html');return false;">
          <span class="method-name">create_login_link</span><span class="method-args">(a_parameter_hash)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Create a auth link for the user to follow to allow this app
</p>
<p>
Required Parameters:
</p>
<ul>
<li>frob - frob to use

</li>
<li>perms - &quot;read&quot; or &quot;write&quot;

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li>a URL that the user must follow in order to allow the app

</li>
</ul>
        </div>
      </div>

      <div id="method-M000093" class="method-detail">
        <a name="M000093"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000093.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000093.html');return false;">
          <span class="method-name">create_login_link</span><span class="method-args">(a_parameter_hash)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Create a auth link for the user to follow to allow this app
</p>
<p>
Required Parameters:
</p>
<ul>
<li>frob - frob to use

</li>
<li>perms - &quot;read&quot; or &quot;write&quot;

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li>a URL that the user must follow in order to allow the app

</li>
</ul>
        </div>
      </div>

      <div id="method-M000097" class="method-detail">
        <a name="M000097"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000097.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000097.html');return false;">
          <span class="method-name">create_signature</span><span class="method-args">(a_params)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Create the signature required for signing methods see <a
href="http://www.flickr.com/services/api/auth.howto.desktop.html">www.flickr.com/services/api/auth.howto.desktop.html</a>
for more detialed info
</p>
<p>
IN:
</p>
<ul>
<li>a_params =&gt; a hash of parameters that are required to be passed to the
method you want to call - must include the method its self

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li>a signature for the call you want to make

</li>
</ul>
        </div>
      </div>

      <div id="method-M000088" class="method-detail">
        <a name="M000088"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000088.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000088.html');return false;">
          <span class="method-name">create_signature</span><span class="method-args">(a_params)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Create the signature required for signing methods see <a
href="http://www.flickr.com/services/api/auth.howto.desktop.html">www.flickr.com/services/api/auth.howto.desktop.html</a>
for more detialed info
</p>
<p>
IN:
</p>
<ul>
<li>a_params =&gt; a hash of parameters that are required to be passed to the
method you want to call - must include the method its self

</li>
</ul>
<p>
RETURNS:
</p>
<ul>
<li>a signature for the call you want to make

</li>
</ul>
        </div>
      </div>

      <div id="method-M000094" class="method-detail">
        <a name="M000094"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000094.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000094.html');return false;">
          <span class="method-name">params_are_valid</span><span class="method-args">(a_array_of_required_params, a_array_of_extra_allowed_param_names, a_hash_of_params_and_values)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
calls <a
href="ZooomrRestAPI.html#M000094">ZooomrRestAPI.params_are_valid</a>
</p>
        </div>
      </div>

      <div id="method-M000103" class="method-detail">
        <a name="M000103"></a>

        <div class="method-heading">
          <a href="ZooomrRestAPI.src/M000103.html" target="Code" class="method-signature"
            onclick="popupCode('ZooomrRestAPI.src/M000103.html');return false;">
          <span class="method-name">params_are_valid</span><span class="method-args">(a_array_of_required_params, a_array_of_extra_allowed_param_names, a_hash_of_params_and_values)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
calls <a
href="ZooomrRestAPI.html#M000094">ZooomrRestAPI.params_are_valid</a>
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>